package com.sh.data.engine.domain.datadev.flink.model.domain;

import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author: zigui.zdf
 * @description:
 * @date: 2021/6/4 10:34
 */
@Data
//@ApiModel
public class SaveDimDomain {

    //    @ApiModelProperty(value = "节点id")
    @NotNull(message = "节点id不能为空")
    private Long nodeId;

    //    @ApiModelProperty(value = "来源配置")
    private List<Dim> dims;

    @Data
//    @ApiModel
    public static class Dim {

        /**
         * 数据源类型
         */
        private String dsType;

        /**
         * 数据源id
         */
        private Long dsId;

        /**
         * 映射表
         */
        private String mappingTableName;

        /**
         * 映射字段
         */
        private List<FlinkFieldDomain> fieldList;

        /**
         * dataMode为1时，需要选择主键字段
         */
        private List<String> primaryFields;

        /**
         * 并行度
         */
        private Integer parallel;

        /**
         * 缓存策略
         */
        private Integer cacheStrategy;

        /**
         * 缓存大小（行数）
         */
        private Integer cacheSize;

        /**
         * 缓存超时时间
         */
        private Long cacheTimeout;

        private JDBCDimDomain jdbcDimDomain;
    }
}
